<!DOCTYPE html>
<html lang="en">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <title>打印会计凭证明细</title>
    <link rel="shortcut icon" href="/web/static/src/img/favicon.ico" type="image/x-icon">
    <link rel="stylesheet" href="/web/static/src/css/full.css">
    <link rel="stylesheet" href="/web/static/lib/fontawesome/css/font-awesome.css">
    <link rel="stylesheet" href="/web/static/lib/bootstrap/css/bootstrap.css">
    <link rel="stylesheet" href="/web/static/src/css/base.css">

    <script language="javascript" src="/lodop/static/lib/lodop6/LodopFuncs.js?v=6.1.0.0"></script>
    <script language="javascript" src="/lodop/static/src/js/mathlibrary.js"></script>

    <style type="text/css" id="style">
        body {
            padding: 10px;
            font-size: 8pt;
            overflow: scroll;
        }

        @media print {
            .print-hide {
                display: none
            }
        }

        .td_inline {
            display: block;
            overflow: hidden;
            white-space: nowrap;
            text-overflow: ellipsis;
            width: 370pt;
        }

        .nowrap {
            white-space: nowrap;
        }

        .curPre {

        }

        .table thead tr td {
            font-weight: bold;
            font-size: 9pt;
        }

        h4 {
            margin: 0px;
            padding: 0px;
            font-size: 12pt
        }

        h5 {
            font-size: 11pt;
            font-family: '黑体';
            font-weight: bold;
            margin: 0px;
            padding: 0px;
        }

        div {
            font-size: 8pt
        }

        span.foot_sign {
            border-bottom: 1px solid #ddd
        }

        .table tbody tr td {
            border-top: 1px solid #ddd;
        }

        .table tbody tr:last-child td {
            border-top: 1px solid #ddd;
        }
        .table tbody tr.memo td {
            padding: 0px;
            border-top: 0px
        }
        td {
            font-size: 8pt
        }
    </style>
</head>

<body>
<object id="LODOP_OB" classid="clsid:2105C259-1E0C-4534-8141-A753534CB4CA" width=0 height=0>
    <embed id="LODOP_EM" type="application/x-print-lodop" width=0 height=0></embed>
</object>

<!-- lodop 控制脚本 -->
<div class="controls controls-row print-hide">
    <script>
      function CheckIsInstall () {
        try {
          window.LODOP = getLodop(document.getElementById('LODOP_OB'), document.getElementById('LODOP_EM'))
          //if ((LODOP!=null)&&(typeof(LODOP.VERSION)!="undefined")) alert("本机已成功安装过Lodop控件!\n  版本号:"+LODOP.VERSION);
          return true
        } catch (err) {
          //alert("Error:本机打印控件未安装或需要升级!");
        }
      }

      function print_preview () {
        LODOP.PRINT_INIT('供应商付款申请单')
        LODOP.ADD_PRINT_HTM(0, 0, '100%', '100%', '<body>' +
          '<link rel="stylesheet" type="text/css" href="/resources/bootstrap/css/bootstrap.min.css">' +
          document.documentElement.innerHTML +
          '</body>')
        LODOP.PREVIEW()
      }
    </script>

    注: 打印A4纸按Ctrl+P键，或者菜单上面选择文件->打印，文件->页面设置里面可以去除页眉页脚

</div>
{% for account_move_lines in all_page %}
{% if account_move_lines %}
<!-- 供应商付款申请单表头 -->
<div id="div-header">
    <table border="0" cellSpacing="0" cellPadding="0" width="100%">
        <tbody>
        <tr>
            <td align="center" colspan="4">
                <h4 class="page_head">
                    {{account_move_lines[0].period_id.name}}期间{{account_move_lines[0].journal_id.name}}
                    {{account_move_lines[0].journal_id.code}}分录会计凭证明细行</h4>
            </td>
        </tr>
        <tr>
            <td>
                打印时间: {{print_date| strfdatetime}}

            </td>
            <td>
                打印人: {{user_id}}
            </td>
        </tr>
        </tbody>
    </table>
</div>

<br/>

<!-- 供应商付款申请单表身 -->
<div id="div-body">
    <table class="table table-striped" width="100%">
        <thead>
        <tr>
            <td>分录|会计期间|生效日期</td>
            <td>名称</td>
            <td>关联</td>
            <td>业务伙伴</td>
            <td>会计科目|会计凭证</td>
            <td>借方</td>
            <td>贷方</td>
        </tr>
        </thead>
        <tbody>

        {% for line in account_move_lines %}
        <tr>
            <td>
                {{line.journal_id.name}} {{line.period_id.name}} （{{line.date|strsplit(5, 10)}}）
            </td>
            <td>
                {% if line.name %}
                {{line.name}}
                {% endif %}
            </td>
            <td>
                {% if line.ref %}
                {{line.ref}}
                {% endif %}
            </td>
            <td>
                {% if line.partner_id and line.partner_id.name%}
                {{line.partner_id.name}}
                {% endif %}
            </td>
            <td>
                {{line.account_id.code}}-{{line.account_id.name}} {{line.move_id.name}}
            </td>
            <td>
                {{line.debit}}
            </td>
            <td>
                {{line.credit}}
            </td>
            <td>
            </td>
        </tr>
        {% endfor %}
        </tbody>
    </table>
    主管:<u>　　　　　</u>　财务：<u>　　　　　　</u> .

</div>
<div style="page-break-after:always;"></div>
{% endif %}
{% endfor %}
</body>
</html>